package ooday01Exercise;

public class Student {
    //成员变量：name age className stuID
    //构造方法：无参，有两个参数的，有四个参数的
    //方法：study(),sayHi(),playWith(another)
    String name;
    int age;
    String className;
    String stuID;

    Student(){

    }

    Student(String name,int age){
        this.name=name;
        this.age=age;
    }

    Student(String name,int age,String className,String stuID){
        this.name=name;
        this.age=age;
        this.className=className;
        this.stuID=stuID;
    }

    void study(){
        System.out.println(name+"正在学习.....");
    }

    void sayHi(){
        System.out.println("大家好，我叫"+name+"，我"+age+"岁了，我在"+className);
    }

    void playWith(String another){
        System.out.println(name+"正在和"+another+"一起玩....");
    }

}
